{extend name="public/common"}

{block name="style"}
<title>党员身份证</title>
<link rel="stylesheet" href="/home/css/user/identity.css">
{/block}

{block name="body"}
<div class="lists">
    <div class="list clear tag">
        <span class="fl">党员信息</span>
    </div>
    <div class="list clear">
        <span class="fl">姓名</span>
        <span class="fr">{$msg.name}</span>
    </div>
    <div class="list clear toshow"  data-toggle="modal" data-target="#modal">
        <span class="fl">二维码</span>
        <span class="fr"><img src="/home/images/user/er.png" alt="" class="er"><i class="fa fa-angle-right"></i></span>
    </div>
    <div class="list clear">
        <span class="fl">性别</span>
        <span class="fr">{$msg.gender}</span>
    </div>
    <div class="list clear">
        <span class="fl">出生日期</span>
        <span class="fr">{$msg.birthday}</span>
    </div>
    <div class="list clear">
        <span class="fl">手机号</span>
        <span class="fr">{$msg.mobile}</span>
    </div>
    <div class="list clear">
        <span class="fl">职位</span>
        <span class="fr">{$msg.position}</span>
    </div>
    <div class="list clear">
        <span class="fl">入党时间</span>
        <span class="fr">{$msg.partytime}</span>
    </div>
    <div class="list clear">
        <span class="fl">所在支部</span>
        <span class="fr">{$msg.department}</span>
    </div>

</div>
<!-- 二维码 -->
<div class="modal fade" id="modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="code">
                <div id="qrcode"></div>
            </div>
            <img src="{$msg.headimgurl}" alt="个人头像" class="header">
        </div>
    </div>
</div>
{/block}

{block name="script"}
<script src="/static/code/jquery.qrcode.min.js"></script>
<script>
    $(function(){
        //模块标题
        $('title' ).text('党员身份证');
        $('.toshow' ).on('click',function(){
            $('#model').modal('show');
        });
        var code = $('.code' );
        var ww = code.width();
        var hh = code.height();
        var id = '{$msg.userid}';
        jQuery('#qrcode').qrcode({
            width: ww,
            height:hh,
            text: '{$request}/home/person/eg/id/'+id
//		text: id

        });
        //隐藏手机号中间四位
//	var tel = $('.list').eq(4 ).find('.fr');
//	var t = tel.text().split('');
//	t.splice(3,4,'****' );
//	t=t.join("");
//	tel.text(t);
    })
</script>
{/block}